package workspace;

import java.util.Scanner;
//有字符串yujwedjhccdskdsewirewrwsadm,fnsdklwweqpq取出所有两个w之间的字符串并用归并排序进行排序 （字符串处理）
public class test14 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String input = scanner.next();
        String[] str = input.split("w");

        StringBuilder sb = new StringBuilder();

        for (int i = 0; i < str.length; i++) {
            if(i!=0&&i!= str.length-1&&str[i].length()!=0){
                sb.append(str[i]);
            }
        }
        //提取出w之间的字母
        sort(sb,0,sb.length()-1);
        System.out.println(sb.toString());
    }
    public static void sort(StringBuilder str,int left,int right){
        if(left<right){
            int mid = (left+right)/2;
            sort(str,left,mid);
            sort(str,mid+1,right);
            merge(str,left,mid,right);
        }
    }


    public static void merge(StringBuilder str,int left,int mid,int right){
        StringBuilder temp = new StringBuilder();

        int i = left;
        int j = mid +1;

        while(i<=mid&&j<=right){
            if(str.charAt(i)<=str.charAt(j)){
                temp.append(str.charAt(i));
            }else{
                temp.append(str.charAt(j));
            }
            i++;
            j++;
        }
        while(i<=mid){
            temp.append(str.charAt(i));
            i++;
        }
        while(j<=right){
            temp.append(str.charAt(j));
            j++;
        }
        str.replace(left,right+1,temp.toString());
    }

}
